<template>
	<view>
		<totalMask :show.sync="isShow" :showType="showType">
			<view class="nvue-flex">
				<view class="more-title">
					<text class="title">更多</text>
				</view>
				
				<view class="more-list">
					<block v-for="(item, index) in list" :key="index">
						<view class="more-item" @click="item.handle()">
							<image class="more-img" :src="item.icon"></image>
				
							<text class="more-name">{{item.title}}</text>
						</view>
					</block>
				</view>
			</view>
		</totalMask>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: [{
						title: "美颜",
						icon: "/static/live/moreMY.png",
						handle: () => {
							uni.$emit("ZBShowBeauty")
						}
					},
					{
						title: "翻转",
						icon: "/static/live/moreFZ.png",
						handle: () => {
							uni.$emit("ZBSwitchCamera")
						}
					},
					{
						title: "打赏",
						icon: "/static/live/moreLW.png",
						handle: () => {
							uni.$emit("ZBGiftRecords")
						}
					},
					{
						title: "钱包",
						icon: "/static/live/moreQB.png",
						handle: () => {
							uni.$emit("onShowWallet")
						}
					},
				],
				showType: 0,
				isShow: false,
			}
		},
		destroyed() {
			uni.$off("ZBShowMore")
		},
		mounted() {
			/**
			 * 展示更多
			 */
			uni.$on("ZBShowMore", () => {
				this.isShow = true
				this.showType = 1
			});
		},
		methods: {
		}
	}
</script>

<style scoped>
	.more-title {
		width: 300rpx;
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: center;
	}
	.title {
		color: white;
		font-size: 32rpx;
	}
	.more-list {
		margin-top: 60rpx;
		width: 750rpx;
		overflow: hidden;
		display: flex;
		flex-direction: row;
		flex-wrap: wrap;
	}

	.more-item {
		margin-left: 30rpx;
		width: 150rpx;
		height: 150rpx;
		margin-bottom: 20rpx;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.more-img {
		width: 60rpx;
		height: 60rpx;
	}

	.more-name {
		margin-top: 10rpx;
		color: white;
		font-size: 24rpx;
	}
</style>